if (self.CavalryLogger) { CavalryLogger.start_js(["nx+aW"]); } __d("AudienceManagerEngagementVideoSelectionError.react",["ix","CenteredContainer.react","Image.react","Link.react","React","SUIBusinessTheme","SUIText.react","cxMargin"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.$1=function(){return this.props.subtitleLabel==null||this.props.subtitleLabel===""?null:b("React").createElement(b("SUIText.react"),{display:"block",shade:"light",size:"meta1",theme:b("SUIBusinessTheme")},this.props.subtitleLabel)};d.$2=function(){if(this.props.actionLabel==null||this.props.actionLabel==="")return null;return!this.props.onActionClick?b("React").createElement(b("SUIText.react"),{display:"block",shade:"light",size:"meta1",theme:b("SUIBusinessTheme")},this.props.actionLabel):b("React").createElement(b("Link.react"),{onClick:this.props.onActionClick},b("React").createElement("div",{display:"block"},this.props.actionLabel))};d.render=function(){return b("React").createElement(b("CenteredContainer.react"),{horizontal:!0,vertical:!0},b("React").createElement(b("Image.react"),{src:g("76143")}),b("React").createElement(b("SUIText.react"),{className:"_3-8x",display:"block",shade:"light",size:"meta1",theme:b("SUIBusinessTheme"),weight:"bold"},this.props.mainLabel),this.$1(),this.$2())};return c}(b("React").Component);e.exports=a}),null); __d("ScrollLayout",["EventEmitter"],(function(a,b,c,d,e,f){__p&&__p();a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){var b;b=a.call(this)||this;b.$ScrollLayout1=0;b.$ScrollLayout4=0;b.$ScrollLayout3=0;b.$ScrollLayout2=!1;return b}var c=b.prototype;c.setScrollTop=function(a){a!==this.$ScrollLayout4&&(this.$ScrollLayout4=a,this.requestChange())};c.getScrollTop=function(){return this.$ScrollLayout4};c.setScrollHeight=function(a){a!==this.$ScrollLayout3&&(this.$ScrollLayout3=a,this.requestChange())};c.getScrollHeight=function(){return this.$ScrollLayout3};c.getHeight=function(){return this.$ScrollLayout1};c.setHeight=function(a){a!==this.$ScrollLayout1&&(this.$ScrollLayout1=a,this.requestChange())};c.requestChange=function(){this.$ScrollLayout2||(this.$ScrollLayout2=!0,this.emit("change"),this.$ScrollLayout2=!1)};return b}(b("EventEmitter"));e.exports=a}),null); __d("LayoutScrollableViewDelegate.react",["cx","React","ResponsiveBlock.react","ScrollLayout","translateDOMPositionXY"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f0?e.inform(b("FilePickerEvent").SELECTED,{sender:babelHelpers.assertThisInitialized(e),source:b("SelectionSource").FILE,selections:a}):d.onDocumentDragLeaveCallback.call(null)});e.$DragDropFilePicker1.enable();return e}var d=c.prototype;d.disable=function(){this.$DragDropFilePicker1.disable()};return c}(b("mixin")(b("ArbiterMixin")));e.exports=a}),null); __d("OmnipickerHTML5FilePickerFactory",["fbt","HTML5FilePicker"],(function(a,b,c,d,e,f,g){a={create:function(a){return new(b("HTML5FilePicker"))(a,{accept:"image/*",fallbackFunction:function(){},multiple:!0,qn:"todo",waterfallApp:"web_omnipicker",waterfallUploader:"html5",waterfallMethod:"file_selector",title:g._("Choose files to upload")})}};e.exports=a}),null); __d("OmnipickerDispatcher",["Dispatcher_DEPRECATED"],(function(a,b,c,d,e,f){"use strict";e.exports=new(b("Dispatcher_DEPRECATED"))()}),null); __d("OmnipickerActions",["OmnipickerDispatcher","clamp","keyMirror"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("keyMirror")({APP_INITIALIZED:null,FILE_PICKER_SELECT_STARTED:null,FILE_PICKER_SELECTED:null,FILE_PICKER_SELECT_CANCELED:null,EXISTING_PHOTOS_FETCHED:null,PANEL_INITIALIZED:null,PHOTO_SELECTED_OPTIMISTICALLY:null,PHOTO_SOURCE_SELECTED:null,RESIZE_FAILED:null,RESIZE_STARTED:null,RESIZE_SUCCEEDED:null,SELECTION_CHANGED:null,UPLOAD_CANCELED:null,UPLOAD_FAILED:null,UPLOAD_FINISHED:null,UPLOAD_PROGRESSED:null,UPLOAD_QUEUED:null,UPLOAD_STARTED:null});a={types:g,appInitialized:function(a,c,d,e){b("OmnipickerDispatcher").dispatch({type:g.APP_INITIALIZED,appID:a,logger:c,initialSource:d,singleSelection:e})},panelInitialized:function(a,c){b("OmnipickerDispatcher").dispatch({type:g.PANEL_INITIALIZED,appID:a,source:c})},photoSourceSelected:function(a,c){b("OmnipickerDispatcher").dispatch({type:g.PHOTO_SOURCE_SELECTED,appID:a,source:c})},filePickerSelectStarted:function(a,c,d){b("OmnipickerDispatcher").dispatch({type:g.FILE_PICKER_SELECT_STARTED,appID:a,method:c,ref:d})},filePickerSelected:function(a,c,d){b("OmnipickerDispatcher").dispatch({type:g.FILE_PICKER_SELECTED,appID:a,method:c,ref:d})},filePickerSelectCancelled:function(a,c,d){b("OmnipickerDispatcher").dispatch({type:g.FILE_PICKER_SELECT_CANCELED,appID:a,method:c,ref:d})},resizeFailed:function(a,c,d,e){b("OmnipickerDispatcher").dispatch({type:g.RESIZE_FAILED,appID:a,dt:c,bytes:d,errorCode:e})},resizeStarted:function(a){b("OmnipickerDispatcher").dispatch({type:g.RESIZE_STARTED,appID:a})},resizeSucceeded:function(a,c,d,e,f){b("OmnipickerDispatcher").dispatch({type:g.RESIZE_SUCCEEDED,appID:a,dt:c,bytes:d,originalSize:e,customTags:f})},uploadQueued:function(a,c,d){b("OmnipickerDispatcher").dispatch({type:g.UPLOAD_QUEUED,appID:a,source:c,ids:d.map(function(a){return a.getSelectionContainerID()}),volume:d.length})},selectionChanged:function(a,c,d,e){b("OmnipickerDispatcher").dispatch({type:g.SELECTION_CHANGED,appID:a,source:c,id:d,checked:e})},uploadStart:function(a,c,d,e){b("OmnipickerDispatcher").dispatch({type:g.UPLOAD_STARTED,appID:a,source:c,id:d,bytes:e})},uploadProgress:function(a,c,d,e){e=b("clamp")(e.bytesTransferred/e.file.size*100,0,100);b("OmnipickerDispatcher").dispatch({type:g.UPLOAD_PROGRESSED,appID:a,source:c,id:d,progress:e})},uploadDone:function(a,c,d,e,f,h){b("OmnipickerDispatcher").dispatch({type:g.UPLOAD_FINISHED,appID:a,source:c,id:d,src:e,fbid:f,retriesNeeded:h})},uploadFailed:function(a,c,d,e,f){b("OmnipickerDispatcher").dispatch({type:g.UPLOAD_FAILED,appID:a,source:c,id:d,retriesNeeded:e,errorCode:f})},existingPhotosFetched:function(a,c,d){b("OmnipickerDispatcher").dispatch({type:g.EXISTING_PHOTOS_FETCHED,appID:a,photos:d.map(function(a){return{source:c,id:a.id,src:a.image.uri}})})},optimisticSelect:function(a,c,d){b("OmnipickerDispatcher").dispatch({type:g.PHOTO_SELECTED_OPTIMISTICALLY,appID:a,source:c,id:d})},cancelUpload:function(a,c,d){b("OmnipickerDispatcher").dispatch({type:g.UPLOAD_CANCELED,appID:a,source:c,id:d})}};e.exports=a}),null); __d("OmnipickerUploadController",["OmnipickerActions","SelectionSource"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.registerOmnipicker=function(a){this.$1[a]={}};c.registerAdapter=function(a,c,d){__p&&__p();this.$1[a][d]=c;d=b("SelectionSource").toPhotoSourceType(d);c.subscribe("maxReached",function(){});c.subscribe("resize_start",this.$2.bind(this,a));c.subscribe("resize_done",this.$3.bind(this,a));c.subscribe("resize_hires_start",function(){});c.subscribe("upload_start",this.$4.bind(this,a,d));c.subscribe("upload_progress",this.$5.bind(this,a,d));c.subscribe("upload_done",this.$6.bind(this,a,d));c.subscribe("upload_failed",this.$7.bind(this,a,d));c.subscribe("finished",function(){})};c.uploadSelections=function(a,c,d,e){__p&&__p();if(!d.every(function(a){return a.getSource()==c}))throw new Error("Selections' source must be "+c);var f=this.$1[a][c],g=b("SelectionSource").toPhotoSourceType(c);if(!f){d.forEach(function(c){var d=c.getExistingImageID();c=c.getSrc();b("OmnipickerActions").uploadDone(a,g,d,c,d,0)});return}d[0].hasPlaceholderUI()||b("OmnipickerActions").uploadQueued(a,g,d);f.uploadSelections(d,e)};c.cancelUpload=function(a,c,d){b("OmnipickerActions").cancelUpload(a,c,d)};c.$2=function(a,c,d){b("OmnipickerActions").resizeStarted(a)};c.$3=function(a,c,d){c=d.scubaData.scuba_ints;var e=c.timeResizing||c.dt,f=c.resizedSize;d.error?b("OmnipickerActions").resizeFailed(a,e,f,d.error.message):b("OmnipickerActions").resizeSucceeded(a,e,f,c.originalSize,{skipped_resizing:d.scubaData.scuba_tags.skippedResizing})};c.$4=function(a,c,d,e){b("OmnipickerActions").uploadStart(a,c,e.uploadID,e.size)};c.$5=function(a,c,d,e){b("OmnipickerActions").uploadProgress(a,c,e.uploadID,e)};c.$6=function(a,c,d,e){b("OmnipickerActions").uploadDone(a,c,e.uploadID,e.response.src,e.response.fbid,e.retriesNeeded)};c.$7=function(a,c,d,e){b("OmnipickerActions").uploadFailed(a,c,e.uploadID,e.retriesNeeded,e.response_error)};return a}();e.exports=new a()}),null); __d("OmnipickerUploadSession",["FilePickerEvent","OmnipickerActions","OmnipickerUploadController","PhotoSourceTypes","SubscriptionsHandler"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.registerOmnipicker=function(a){this.$1[a]={pickersData:[]}};c.addPicker=function(a,c,d,e){__p&&__p();var f=new(b("SubscriptionsHandler"))();f.addSubscriptions(c.subscribe(b("FilePickerEvent").SELECT_START,function(c,f){b("OmnipickerActions").filePickerSelectStarted(a,e,d)}),c.subscribe(b("FilePickerEvent").SELECTED,function(c,f){if(f.selections&&f.selections.length>0){b("OmnipickerActions").filePickerSelected(a,e,d);c=f.selections[0].getSource();b("OmnipickerUploadController").uploadSelections(a,c,f.selections)}}),c.subscribe(b("FilePickerEvent").SELECT_CANCELED,function(c,f){b("OmnipickerActions").filePickerSelectCancelled(a,e,d)}));this.$1[a].pickersData.push({picker:c,subscriptions:f})};c.removePicker=function(a,b){var c=this.$1[a].pickersData;c.forEach(function(a,d){a.picker===b&&(a.subscriptions.release(),c.splice(d,1))})};c.cancelUpload=function(a,c,d){if(c!==b("PhotoSourceTypes").COMPUTER)throw new Error("Can only cancel "+b("PhotoSourceTypes").COMPUTER+" uploads. Actual source: "+c);b("OmnipickerUploadController").cancelUpload(a,c,d)};return a}();e.exports=new a()}),null); __d("HTML5FilePickerButton.react",["fbt","OmnipickerHTML5FilePickerFactory","OmnipickerUploadSession","PhotoSourceTypes","React","ReactDOM","XUIButton.react"],(function(a,b,c,d,e,f,g){__p&&__p();a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.componentDidMount=function(){this.picker=b("OmnipickerHTML5FilePickerFactory").create(b("ReactDOM").findDOMNode(this.refs.fileButton)),b("OmnipickerUploadSession").addPicker(this.props.appID,this.picker,b("PhotoSourceTypes").COMPUTER,"file_selector")};d.componentWillUnmount=function(){b("OmnipickerUploadSession").removePicker(this.props.appID,this.picker)};d.render=function(){var a=g._("Select Files");return b("React").createElement(b("XUIButton.react"),{ref:"fileButton",href:"#",size:"xlarge",label:a})};return c}(b("React").Component);c.propTypes={appID:a.string.isRequired};e.exports=c}),null); __d("DragDropInstructions.react",["cx","fbt","ComputerPanelActionState","HTML5FilePickerButton.react","React"],(function(a,b,c,d,e,f,g,h){__p&&__p();a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;gc.photoCount){a=b("ReactDOM").findDOMNode(this.refs.pickerBox);b("Scroll").setTop(a,a.scrollHeight)}};d.render=function(){return b("React").createElement("div",null,b("React").createElement("div",{className:"_1x-l"},b("React").createElement("div",{className:"_1-ne _1-nf",ref:"pickerBox"},this.renderPhotoGrid(),this.renderInstructions())),this.renderDragAndDropInstructions())};return c}(b("React").Component);c.propTypes={actionState:a.oneOf(Object.keys(b("ComputerPanelActionState"))).isRequired,appID:a.string.isRequired,photoData:a.object.isRequired};e.exports=c}),null); __d("ComputerPanel.react",["ComputerPanelActionState","DragDropFilePicker","EmptyPanel.react","FilePickerEvent","HTML5UploadAdapter","OmnipickerConfig","OmnipickerPanelMixin.react","OmnipickerUploadSession","PhotoPanel.react","PhotosMimeType","PhotoSourceTypes","React","SelectionSource"],(function(a,b,c,d,e,f){__p&&__p();a=b("React").createClass({displayName:"ComputerPanel",mixins:[b("OmnipickerPanelMixin.react")],statics:{getAdapter:function(a,c){var d=b("OmnipickerConfig").FILE_UPLOAD_URI;c&&c.fileUploadURI&&(d=c.fileUploadURI);return new(b("HTML5UploadAdapter"))({uri:d,maxRetries:b("OmnipickerConfig").HTML5_UPLOADER_MAX_RETRIES,maxParallel:b("OmnipickerConfig").HTML5_UPLOADER_MAX_PARALLEL,postParams:{},qn:a.getWaterfallID(),waterfallApp:a.getWaterfallAppName(),waterfallUploader:"html5"})}},getDefaultProps:function(){return{selectionSource:b("SelectionSource").FILE,sourceType:b("PhotoSourceTypes").COMPUTER}},getInitialState:function(){return{actionState:b("ComputerPanelActionState").NEUTRAL}},componentDidMount:function(){var a=this;this.picker=new(b("DragDropFilePicker"))(document.documentElement,{onDocumentDragEnterCallback:function(){a.setState({actionState:b("ComputerPanelActionState").DROP})},onDocumentDragLeaveCallback:function(){a.setState({actionState:b("ComputerPanelActionState").NEUTRAL})},isFileValid:function(a){return b("PhotosMimeType").isImage(a.type)}});b("OmnipickerUploadSession").addPicker(this.props.appID,this.picker,b("PhotoSourceTypes").COMPUTER,"dragdrop");this.picker.subscribe(b("FilePickerEvent").SELECTED,this.onFilesDropped)},componentWillUnmount:function(){this.picker.disable(),b("OmnipickerUploadSession").removePicker(this.props.appID,this.picker)},onFilesDropped:function(a){this.setState({actionState:b("ComputerPanelActionState").NEUTRAL})},renderEmptyPanel:function(){return b("React").createElement(b("EmptyPanel.react"),{actionState:this.state.actionState,appID:this.props.appID})},renderPhotoPanel:function(){return b("React").createElement(b("PhotoPanel.react"),{actionState:this.state.actionState,appID:this.props.appID,photoData:this.props.photoData})},render:function(){var a=Object.keys(this.props.photoData).length;a=a===0?this.renderEmptyPanel():this.renderPhotoPanel();return b("React").createElement("div",null,a)}});e.exports=a}),null); __d("OmnipickerLoggerStore",["invariant","FluxStore","OmnipickerActions","OmnipickerDispatcher"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("OmnipickerActions").types;a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(b){b=a.call(this,b)||this;b.$OmnipickerLoggerStore1={};return b}var c=b.prototype;c.__onDispatch=function(a){__p&&__p();if(a.type===h.APP_INITIALIZED){a.logger||g(0,4888,a.appID);this.$OmnipickerLoggerStore1[a.appID]=a.logger;return}var b=this.$OmnipickerLoggerStore1[a.appID];b||g(0,4889,a.appID);switch(a.type){case h.FILE_PICKER_SELECT_STARTED:case h.FILE_PICKER_SELECTED:case h.FILE_PICKER_SELECT_CANCELED:this.$OmnipickerLoggerStore2(a,b);break;case h.RESIZE_STARTED:b.logStep("client_upload_begin");b.logStep("client_process_begin");break;case h.RESIZE_SUCCEEDED:b.logStep("client_process_success",{dt:a.dt,bytes:a.bytes,media_data_size:a.originalSize,custom_tags:a.customTags});break;case h.RESIZE_FAILED:b.logStep("client_process_fail",{dt:a.dt,bytes:a.bytes,error_code:a.errorCode});break;case h.UPLOAD_STARTED:b.logStep("client_transfer_begin",{bytes:a.bytes,ref:a.source});break;case h.UPLOAD_FINISHED:b.logStep("client_transfer_success",{auto_retry_count:a.retriesNeeded,ref:a.source});b.logStep("client_upload_success",{fbid:a.fbid,ref:a.source});break;case h.UPLOAD_FAILED:b.logStep("client_upload_fail",{auto_retry_count:a.retriesNeeded,error_code:a.errorCode,ref:a.source});break;case h.UPLOAD_QUEUED:b.logStep("client_transfer_batch_begin",{ref:a.source,volume:a.volume});break;default:}};c.$OmnipickerLoggerStore2=function(a,b){__p&&__p();var c;switch(a.type){case h.FILE_PICKER_SELECT_STARTED:c="client_select_begin";break;case h.FILE_PICKER_SELECTED:c="client_select_success";break;case h.FILE_PICKER_SELECT_CANCELED:c="client_select_cancel";break;default:g(0,4890,a.type)}var d=a.method;a=a.ref;b.logStep(c,{method:d,ref:a})};return b}(b("FluxStore"));a.__moduleID=e.id;e.exports=new a(b("OmnipickerDispatcher"))}),null); __d("OmnipickerPanelList.react",["cx","ix","Image.react","OmnipickerActions","PhotoSourceTypes","React"],(function(a,b,c,d,e,f,g,h){__p&&__p();a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.UNSAFE_componentWillMount=function(){var a=this;b("React").Children.forEach(this.props.children,function(c){if(!c)return;var d=a.props.appID;b("OmnipickerActions").panelInitialized(d,c.props.sourceType)})};d.render=function(){var a=this,c=null;this.props.doneSelecting&&(c=b("React").createElement("div",{className:"_5e8d"},b("React").createElement("div",{className:"_5e8e"},b("React").createElement(b("Image.react"),{className:"_5e8o",src:h("95719")}))));var d;this.props.children.length?d=this.props.children.find(function(b){return!b?!1:b.props.sourceType===a.props.selectedSourceType}):d=this.props.children;d=b("React").cloneElement(d,{photoData:this.props.photoData,appID:this.props.appID});return b("React").createElement("div",null,c,b("React").createElement("div",{className:"_5gfy"},d))};return c}(b("React").Component);c.propTypes={appID:a.string,photoData:a.object,doneSelecting:a.bool,selectedSourceType:a.oneOf(Object.keys(b("PhotoSourceTypes")))};e.exports=c}),null); __d("OmnipickerPhotoSourceStore",["FluxStore","OmnipickerActions","OmnipickerDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("OmnipickerActions").types;a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(b){b=a.call(this,b)||this;b.$OmnipickerPhotoSourceStore1={};return b}var c=b.prototype;c.__onDispatch=function(a){switch(a.type){case g.APP_INITIALIZED:this.$OmnipickerPhotoSourceStore1[a.appID]={currentSource:a.initialSource};break;case g.PHOTO_SOURCE_SELECTED:this.$OmnipickerPhotoSourceStore1[a.appID].currentSource=a.source;this.__emitChange();break;default:return}};c.getCurrentSource=function(a){return this.$OmnipickerPhotoSourceStore1[a].currentSource};return b}(b("FluxStore"));a.__moduleID=e.id;e.exports=new a(b("OmnipickerDispatcher"))}),null); __d("OmnipickerPhotoStore",["invariant","FluxStore","OmnipickerActions","OmnipickerDispatcher","OmnipickerPhotoUploadState"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("OmnipickerActions").types;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(b){b=a.call(this,b)||this;b.$OmnipickerPhotoStore1={};return b}var d=c.prototype;d.__onDispatch=function(a){__p&&__p();a.appID||g(0,3178,a.type);var b=this.$OmnipickerPhotoStore1[a.appID];if(b){b=b.deletedPhotos;if(b&&b[a.id])return}switch(a.type){case h.APP_INITIALIZED:this.$OmnipickerPhotoStore2(a);return;case h.PANEL_INITIALIZED:this.$OmnipickerPhotoStore3(a);return;case h.EXISTING_PHOTOS_FETCHED:this.$OmnipickerPhotoStore4(a);break;case h.PHOTO_SELECTED_OPTIMISTICALLY:this.$OmnipickerPhotoStore5(a);break;case h.SELECTION_CHANGED:this.$OmnipickerPhotoStore6(a);break;case h.UPLOAD_CANCELED:this.$OmnipickerPhotoStore7(a);break;case h.UPLOAD_FAILED:this.$OmnipickerPhotoStore8(a);break;case h.UPLOAD_FINISHED:this.$OmnipickerPhotoStore9(a);break;case h.UPLOAD_PROGRESSED:this.$OmnipickerPhotoStore10(a);break;case h.UPLOAD_QUEUED:this.$OmnipickerPhotoStore11(a);break;case h.UPLOAD_STARTED:this.$OmnipickerPhotoStore12(a);break;default:return}this.__emitChange()};d.getState=function(a){a=this.$OmnipickerPhotoStore1[a];return{numPhotosSelected:this.$OmnipickerPhotoStore13(a).length,photosOptimisticallyUploading:a.photosOptimisticallyUploading,photosWaitingForUpload:a.photosWaitingForUpload,photoData:a.photos}};d.getSelectedPhotos=function(a){a=this.$OmnipickerPhotoStore1[a];return this.$OmnipickerPhotoStore13(a,a.uploadOrder).filter(function(a){return a.fbid!==""})};d.$OmnipickerPhotoStore13=function(a,b){var c=this,d=b||a.photos,e=[];Object.keys(a.photos).forEach(function(b){var f=Array.isArray(d[b])?d[b]:Object.keys(d[b]);f.forEach(function(d){d=c.$OmnipickerPhotoStore14(a,b,d);d.checked&&(d&&e.push(d))})});return e};d.$OmnipickerPhotoStore14=function(a,b,c){a=a.photos;a[b]||g(0,3179,b);a=a[b][c];a||g(0,3180,b,c);return a};d.$OmnipickerPhotoStore15=function(a){this.$OmnipickerPhotoStore16(a,["source","id"]);return this.$OmnipickerPhotoStore14(this.$OmnipickerPhotoStore1[a.appID],a.source,a.id)};d.$OmnipickerPhotoStore17=function(a,b){Object.prototype.hasOwnProperty.call(a,b)||g(0,3181,a.type,b),a[b]!==void 0&&a[b]!==null||g(0,3182,a.type,b)};d.$OmnipickerPhotoStore16=function(a,b){var c=this;b.push("appID");b.forEach(function(b){return c.$OmnipickerPhotoStore17(a,b)})};d.$OmnipickerPhotoStore18=function(a,c,d){var e=a.photos;e[c]||g(0,3183,c);e[c][d]&&g(0,3184,c,d);a.uploadOrder[c].push(d);return e[c][d]={id:d,checked:!1,fbid:"",progress:0,src:"",uploadState:b("OmnipickerPhotoUploadState").NOT_STARTED}};d.$OmnipickerPhotoStore19=function(a,b){a.photosWaitingForUpload[b.id]=!0};d.$OmnipickerPhotoStore20=function(a){a=this.$OmnipickerPhotoStore13(a);a.forEach(function(a){return a.checked=!1})};d.$OmnipickerPhotoStore2=function(a){var b=a.appID;this.$OmnipickerPhotoStore1[b]&&g(0,3185,b);this.$OmnipickerPhotoStore1[b]={deletedPhotos:{},photos:{},photosWaitingForUpload:{},photosOptimisticallyUploading:{},uploadOrder:{},singleSelection:a.singleSelection||!1}};d.$OmnipickerPhotoStore5=function(a){var b=this.$OmnipickerPhotoStore1[a.appID];b.photosOptimisticallyUploading[a.id]=!0;b.singleSelection&&this.$OmnipickerPhotoStore20(b);b=this.$OmnipickerPhotoStore15(a);b.checked=!0};d.$OmnipickerPhotoStore6=function(a){this.$OmnipickerPhotoStore16(a,["checked"]);var b=this.$OmnipickerPhotoStore1[a.appID];b.singleSelection&&a.checked&&this.$OmnipickerPhotoStore20(b);b=this.$OmnipickerPhotoStore15(a);b.checked=a.checked};d.$OmnipickerPhotoStore3=function(a){this.$OmnipickerPhotoStore16(a,["source"]);var b=this.$OmnipickerPhotoStore1[a.appID];b.photos[a.source]={};b.uploadOrder[a.source]=[]};d.$OmnipickerPhotoStore21=function(a,c,d,e){if(e===b("OmnipickerPhotoUploadState").FAILED||a.photosOptimisticallyUploading[d])return;a.singleSelection&&this.$OmnipickerPhotoStore20(a);c.checked=!0};d.$OmnipickerPhotoStore22=function(a,b,c,d){b.uploadState=d,delete a.photosWaitingForUpload[c],delete a.photosOptimisticallyUploading[c]};d.$OmnipickerPhotoStore23=function(a,b,c){b=b.id;delete a.photos[c][b];delete a.photosWaitingForUpload[b];delete a.photosOptimisticallyUploading[b];var d=a.uploadOrder[c].indexOf(b);a.uploadOrder[c].splice(d,1);a.deletedPhotos[b]=!0};d.$OmnipickerPhotoStore4=function(a){var b=this;this.$OmnipickerPhotoStore17(a,"photos");var c=this.$OmnipickerPhotoStore1[a.appID];a.photos.forEach(function(a){var d=a.source,e=a.id;a=a.src;d=b.$OmnipickerPhotoStore18(c,d,e);d.src=a})};d.$OmnipickerPhotoStore7=function(a){var b=this.$OmnipickerPhotoStore15(a);this.$OmnipickerPhotoStore23(this.$OmnipickerPhotoStore1[a.appID],b,a.source)};d.$OmnipickerPhotoStore8=function(a){var c=this.$OmnipickerPhotoStore1[a.appID];this.$OmnipickerPhotoStore22(c,this.$OmnipickerPhotoStore15(a),a.id,b("OmnipickerPhotoUploadState").FAILED)};d.$OmnipickerPhotoStore9=function(a){this.$OmnipickerPhotoStore16(a,["src","fbid"]);var c=a.appID,d=a.id,e=a.src,f=a.fbid;c=this.$OmnipickerPhotoStore1[c];a=this.$OmnipickerPhotoStore15(a);var g=b("OmnipickerPhotoUploadState").DONE;this.$OmnipickerPhotoStore21(c,a,d,g);this.$OmnipickerPhotoStore22(c,a,d,g);a.src=e;a.fbid=f};d.$OmnipickerPhotoStore10=function(a){this.$OmnipickerPhotoStore17(a,"progress");a=this.$OmnipickerPhotoStore15(a);a.progress=100};d.$OmnipickerPhotoStore12=function(a){a=this.$OmnipickerPhotoStore15(a);a.uploadState=b("OmnipickerPhotoUploadState").UPLOADING};d.$OmnipickerPhotoStore11=function(a){var b=this;this.$OmnipickerPhotoStore16(a,["source","ids"]);var c=a.source,d=this.$OmnipickerPhotoStore1[a.appID];a=a.ids;a.forEach(function(a){return b.$OmnipickerPhotoStore19(d,b.$OmnipickerPhotoStore18(d,c,a))})};return c}(b("FluxStore"));a.__moduleID=e.id;e.exports=new a(b("OmnipickerDispatcher"))}),null); __d("Omnipicker.react",["invariant","ClientIDs","OmnipickerActions","OmnipickerPanelList.react","OmnipickerPhotoSourceStore","OmnipickerPhotoStore","OmnipickerUploadController","OmnipickerUploadSession","React","SubscriptionsHandler","Waiter","nullthrows","OmnipickerLoggerStore"],(function(a,b,c,d,e,f,g){__p&&__p();b("OmnipickerLoggerStore");b("OmnipickerPhotoSourceStore");b("OmnipickerPhotoStore");a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g0?d.$3||(d.$3=b("nullthrows")(d.$2).wait()):d.$3&&(d.$3(babelHelpers.assertThisInitialized(d)),d.$3=null);d.setState({photoData:a.photoData});d.props.onPhotosChange&&d.props.onPhotosChange(a.numPhotosSelected,c)},d.handleSourceChangeEvent=function(){d.setState(function(a){a=a.appID;return{sourceType:b("OmnipickerPhotoSourceStore").getCurrentSource(b("nullthrows")(a))}})},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.UNSAFE_componentWillMount=function(){__p&&__p();var a=this,c="Omnipicker_ID_"+b("ClientIDs").getNewClientID();b("OmnipickerUploadController").registerOmnipicker(c);b("OmnipickerUploadSession").registerOmnipicker(c);var d=[];b("React").Children.forEach(this.props.children,function(a){a.type===b("OmnipickerPanelList.react")&&d.push(b("React").cloneElement(a,{appID:c}))});d.length===1||g(0,1800);var e=d[0],f=null;b("React").Children.forEach(e.props.children,function(d){if(!d)return;(!f||d.props.isSelected)&&(f=d.props.sourceType);d.type.getAdapter&&b("OmnipickerUploadController").registerAdapter(c,d.type.getAdapter(a.props.logger,d.props.config),d.props.selectionSource)});!f&&g(0,1801);this.setState({appID:c,sourceType:f});b("OmnipickerActions").appInitialized(c,this.props.logger,f,this.props.singleSelection)};d.componentDidMount=function(){var a=this;this.$1=new(b("SubscriptionsHandler"))();this.$1.addSubscriptions(b("OmnipickerPhotoStore").addListener(this.handlePhotosChangeEvent),b("OmnipickerPhotoSourceStore").addListener(this.handleSourceChangeEvent));this.state.appID||g(0,12521);var c=this.state.appID;this.$2=new(b("Waiter"))(function(){a.props.onDoneSelecting(b("OmnipickerPhotoStore").getSelectedPhotos(c),b("nullthrows")(a.state.sourceType))})};d.componentWillUnmount=function(){this.$1&&this.$1.release()};d.componentDidUpdate=function(){this.props.doneSelecting&&b("nullthrows")(this.$2).go()};d.render=function(){var a=this,c=b("nullthrows")(this.state.sourceType),d=b("React").Children.map(this.props.children,function(d){var e={selectedSourceType:c,appID:a.state.appID};d.type===b("OmnipickerPanelList.react")&&Object.assign(e,{photoData:a.state.photoData[c]||{},doneSelecting:a.props.doneSelecting});return b("React").cloneElement(d,e)});return b("React").createElement("div",null,d)};return c}(b("React").Component);a.defaultProps={doneSelecting:!1};e.exports=a}),null); __d("OmnipickerSelector.react",["cx","OmnipickerActions","PhotoSourceTypes","React","ShimButton.react","joinClasses"],(function(a,b,c,d,e,f,g){__p&&__p();a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g1?h._("Use Photos ({number})",[h._param("number",a)]):h._("Use Photos")},d.handleUsePhotos=function(){d.setState({doneSelecting:!0})},d.handleKeyDownEvent=function(a){b("Event").getKeyCode(a)===b("Keys").ESC&&d.props.onCancel()},d.handlePhotosChange=function(a,b){d.setState({numPhotosSelected:a,numPhotosUploading:b})},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.componentDidMount=function(){this.$1=new(b("SubscriptionsHandler"))(),this.$1.addSubscriptions(b("Event").listen(document,"keydown",this.handleKeyDownEvent))};d.componentWillUnmount=function(){this.$1.release()};d.render=function(){var a=this.state.doneSelecting||this.state.numPhotosSelected<1||this.state.numPhotosUploading>0,c=null;b("OmnipickerConfig").FEEDBACK_GROUP_PATH&&(c=b("React").createElement("div",{className:"_2srv"},b("React").createElement(b("Link.react"),{href:b("OmnipickerConfig").FEEDBACK_GROUP_PATH,target:"_blank"},"Omnipicker Feedback Group")));var d=b("React").Children.only(this.props.children);d=b("React").cloneElement(d,{onPhotosChange:this.handlePhotosChange,doneSelecting:this.state.doneSelecting});return b("React").createElement(b("XUIDialog.react"),{shown:!0,layerHideOnBlur:!1,width:b("OmnipickerConfig").DIALOG_WIDTH,key:"dialog"},b("React").createElement(b("XUIDialogTitle.react"),{showCloseButton:!1},b("React").createElement("span",null,this.props.title),b("React").createElement(b("XUICloseButton.react"),{className:"_51-t",label:h._("Close"),onClick:this.props.onCancel})),d,b("React").createElement("div",{className:"_3bnc"},b("React").createElement(b("XUIDialogFooter.react"),{className:"_3bnd",leftContent:c},b("React").createElement(b("XUIDialogButton.react"),{action:"button",label:h._("Cancel"),onClick:this.props.onCancel,size:"xlarge"}),b("React").createElement(b("XUIDialogButton.react"),{className:"_3bne",use:"confirm",action:"confirm",size:"xlarge",disabled:a,label:this.getButtonLabel(),onClick:this.handleUsePhotos}))))};return c}(b("React").Component);c.propTypes={onCancel:a.func.isRequired,title:a.string.isRequired};e.exports=c}),null); __d("OmnipickerDialogRenderer",["DOM","ReactDOM"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(a){this.$1=a,this.$2=a.props.$2,this.$2||(this.$2=b("DOM").create("div"),b("DOM").appendContent(document.body,this.$2))}var c=a.prototype;c.show=function(){this.$2||(this.$2=b("DOM").create("div"),b("DOM").appendContent(document.body,this.$2)),b("ReactDOM").render(this.$1,this.$2)};c.hide=function(){b("ReactDOM").unmountComponentAtNode(this.$2),b("DOM").remove(this.$2),this.$2=null};c.isShowing=function(){return!!this.$2};return a}();e.exports=a}),null); __d("ExistingPhotoSelectionContainer",["BaseSelectionContainer"],(function(a,b,c,d,e,f){__p&&__p();a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(b,a);function b(b,c,d){var e;e=a.call(this)||this;e.$ExistingPhotoSelectionContainer1=b;e.$ExistingPhotoSelectionContainer2=c;e.$ExistingPhotoSelectionContainer3=d;return e}var c=b.prototype;c.getExistingImageID=function(){return this.$ExistingPhotoSelectionContainer1};c.getSrc=function(){return this.$ExistingPhotoSelectionContainer2};c.getSource=function(){return this.$ExistingPhotoSelectionContainer3};c.hasPlaceholderUI=function(){return!0};return b}(b("BaseSelectionContainer"));e.exports=a}),null); __d("ExistingPhotoPicker",["ArbiterMixin","ExistingPhotoSelectionContainer","FilePickerEvent","mixin"],(function(a,b,c,d,e,f){__p&&__p();a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(b){var c;c=a.call(this)||this;c.$ExistingPhotoPicker1=b;return c}var d=c.prototype;d.begin=function(){this.inform(b("FilePickerEvent").BEGIN)};d.select=function(a,c){this.inform(b("FilePickerEvent").SELECTED,{sender:this,selections:[new(b("ExistingPhotoSelectionContainer"))(a,c,this.$ExistingPhotoPicker1)]})};return c}(b("mixin")(b("ArbiterMixin")));e.exports=a}),null); __d("OmnipickerExistingPhotosPanelMixin.react",["cx","invariant","ExistingPhotoPicker","OmnipickerActions","OmnipickerPanelMixin.react","OmnipickerPhotoGrid.react","OmnipickerUploadSession","PhotoStore","React"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=b("React").PropTypes;c={mixins:[b("OmnipickerPanelMixin.react")],propTypes:{initBatchSize:a.number,pageBatchSize:a.number,puwMethod:a.string.isRequired,setID:a.string.isRequired},UNSAFE_componentWillMount:function(){typeof this.getViewState==="function"||h(0,2424),this.picker=new(b("ExistingPhotoPicker"))(this.props.selectionSource),b("OmnipickerUploadSession").addPicker(this.props.appID,this.picker,this.props.sourceType,this.props.puwMethod)},componentDidMount:function(){this.getViewState().initViewState(),this.picker.begin()},componentWillUnmount:function(){this.getViewState().destroy(),b("OmnipickerUploadSession").removePicker(this.props.appID,this.picker)},render:function(){return b("React").createElement("div",null,this.getThrobber(),this.getPhotoGrid())},onViewStateChanged:function(a){var c=this;b("OmnipickerActions").existingPhotosFetched(this.props.appID,this.props.sourceType,a.media.filter(function(a){return!c.props.photoData[a.id]}))},onPhotoSelected:function(a){this.picker.select(a,this.props.photoData[a].src);return!1},getPhotoGrid:function(){var a=this;if(!b("PhotoStore").hasBeenCreated(this.props.setID))return null;var c=null;(!b("PhotoStore").hasBeenCreated(this.props.setID)||b("PhotoStore").hasNextPage(this.props.setID))&&(c=function(){a.getViewState().fetchMore()});return b("React").createElement(b("OmnipickerPhotoGrid.react"),{appID:this.props.appID,onPhotoSelected:this.onPhotoSelected,onScrollPositionThresholdReached:c,photos:this.props.photoData,photoSourceType:this.props.sourceType,showUploadProgress:!1})},getThrobber:function(){return b("PhotoStore").hasBeenCreated(this.props.setID)?null:b("React").createElement("div",{className:"_j0-"})}};e.exports=c}),null); __d("ScrollablePhotoViewStateCore",["SubscriptionsHandler","emptyFunction"],(function(a,b,c,d,e,f){__p&&__p();a=function(){"use strict";__p&&__p();function a(a){this.$1=a.photoStore,this.$2=a.viewer,this.$3=a.setToken,this.$4=a.updateCallback,this.$5=a.subscribeUpdatePhotos,this.$6=a.fetchInitData,this.$7=a.initBatchSize,this.$8=a.pageBatchSize,this.$9=new(b("SubscriptionsHandler"))()}var c=a.prototype;c.initViewState=function(){this.$9.addSubscriptions(this.$5(this.updateData.bind(this)));if(this.$1.hasBeenCreated(this.$3)){var a=this.$1.getAvailableRange(this.$3).length;(a>=this.$7||!this.$1.hasNextPage(this.$3))&&this.syncState();return}this.$6(this.$3)};c.hasNextPage=function(){return this.$1.hasBeenCreated(this.$3)&&this.$1.hasNextPage(this.$3)};c.fetchToIndex=function(a){var c=this.$1.getEndIndex(this.$3);a=a-c;if(a<=0)return;this.$1.getItemsAfterIndex(this.$3,c,a,b("emptyFunction"))};c.fetchMore=function(a){if(!this.hasNextPage())return;this.$1.getItemsAfterIndex(this.$3,this.$1.getEndIndex(this.$3),this.$8,a||b("emptyFunction"))};c.destroy=function(){this.$9.release()};c.updateData=function(a){var b=this;if(a.set_id!=this.$3)return;a=a.query_results&&a.query_results.result_type;a=="init"?this.$1.executePostCreate(this.$3,function(){b.syncState()}):this.syncState()};return a}();e.exports=a}),null); __d("fetchInitPhotoViewState",["AsyncRequest"],(function(a,b,c,d,e,f){function a(a,c){new(b("AsyncRequest"))(a).setData({set:c}).send()}e.exports=a}),null); __d("subscribeToArbiterUpdatePhotos",["Arbiter"],(function(a,b,c,d,e,f){function a(a){return b("Arbiter").subscribe("update-photos",function(b,c){a(c)})}e.exports=a}),null); __d("OmnipickerExistingPhotosViewState",["PhotoStore","ScrollablePhotoViewStateCore","fetchInitPhotoViewState","subscribeToArbiterUpdatePhotos"],(function(a,b,c,d,e,f){__p&&__p();function g(a,c){b("fetchInitPhotoViewState")(a,c)}a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c,d,e,f,h,i){h=a.call(this,{fetchInitData:g.bind(null,h),initBatchSize:e,pageBatchSize:f,photoStore:b("PhotoStore"),setToken:d,subscribeUpdatePhotos:b("subscribeToArbiterUpdatePhotos"),updateCallback:i,viewer:c})||this;h.$OmnipickerExistingPhotosViewState1=e;h.$OmnipickerExistingPhotosViewState2=d;h.$OmnipickerExistingPhotosViewState3=i;return h}var d=c.prototype;d.syncState=function(){this.$OmnipickerExistingPhotosViewState3({media:b("PhotoStore").getItemsInAvailableRange(this.$OmnipickerExistingPhotosViewState2),hasNextPage:b("PhotoStore").hasNextPage(this.$OmnipickerExistingPhotosViewState2)})};return c}(b("ScrollablePhotoViewStateCore"));e.exports=a}),null); __d("XPagesManagerPostedPhotosController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/pages/content_tab/posted_photos/",{set:{type:"String",required:!0},size:{type:"Int",required:!0}})}),null); __d("OmnipickerPagePostedPhotosPanel.react",["ActorURI","OmnipickerConfig","OmnipickerExistingPhotosPanelMixin.react","OmnipickerExistingPhotosViewState","PhotoSourceTypes","React","SelectionSource","XPagesManagerPostedPhotosController"],(function(a,b,c,d,e,f){"use strict";a=b("React").PropTypes;c=b("React").createClass({displayName:"OmnipickerPagePostedPhotosPanel",mixins:[b("OmnipickerExistingPhotosPanelMixin.react")],_viewState:null,propTypes:{pageID:a.string.isRequired},getDefaultProps:function(){return{initBatchSize:20,pageBatchSize:16,puwMethod:"recent_photos",selectionSource:b("SelectionSource").PAGES_POSTED_PHOTOS,setID:b("OmnipickerConfig").POSTED_PHOTOS_SET_ID,sourceType:b("PhotoSourceTypes").PAGES_POSTED_PHOTOS}},UNSAFE_componentWillMount:function(){var a=b("ActorURI").create(b("XPagesManagerPostedPhotosController").getURIBuilder().setString("set",this.props.setID).setInt("size",this.props.initBatchSize).getURI(),this.props.pageID);this._viewState=new(b("OmnipickerExistingPhotosViewState"))(this,this.props.setID,this.props.initBatchSize,this.props.pageBatchSize,a,this.onViewStateChanged)},getViewState:function(){return this._viewState}});e.exports=c}),null); __d("OmnipickerPagePostedPhotosSelector.react",["cx","fbt","OmnipickerSelector.react","PhotoSourceTypes","React"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("OmnipickerSelector.react"),babelHelpers["extends"]({iconClass:"_2_y4"},this.props),this.props.labelText)};return c}(b("React").Component);c.propTypes={labelText:a.node};c.defaultProps={sourceType:b("PhotoSourceTypes").PAGES_POSTED_PHOTOS,labelText:h._("Page Photos")};e.exports=c}),null); __d("OmnipickerSelectorList.react",["cx","PhotoSourceTypes","React"],(function(a,b,c,d,e,f,g){__p&&__p();a=b("React").PropTypes;c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this,c=b("React").Children.map(this.props.children,function(c){if(!c)return;return b("React").cloneElement(c,{isSelected:c.props.sourceType===a.props.selectedSourceType,appID:a.props.appID})});return b("React").createElement("div",{className:"_1n6_"},b("React").createElement("ul",null,c))};return c}(b("React").Component);c.propTypes={appID:a.string,selectedSourceType:a.oneOf(Object.keys(b("PhotoSourceTypes")))};e.exports=c}),null); __d("OmnipickerWaterfallLogger",["PhotosUploadWaterfallXMixin"],(function(a,b,c,d,e,f){__p&&__p();a=function(){"use strict";__p&&__p();function a(a,b){this.$1=a,this.$2=b}var c=a.prototype;c.getWaterfallAppName=function(){return this.$1};c.getWaterfallID=function(){return this.$2};c.logStep=function(a,c,d){return b("PhotosUploadWaterfallXMixin").logStep.call(this,a,c,d)};c.logPUWStep=function(a,c,d,e,f,g,h){return b("PhotosUploadWaterfallXMixin").logPUWStep.call(this,a,c,d,e,f,g,h)};return a}();e.exports=a}),null); __d("ProductVideoChunkedUploader",["AdsVideoUploadEvents","AdsVideoUploadSession","AdsVideoUploadUtil","URI","VideoUploader","VideoUploadProgressBar"],(function(a,b,c,d,e,f){__p&&__p();var g="/v2.4",h="graph-video";a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){var d=c.config,e=new(b("URI"))(g+"/"+c.target_id+"/videos?access_token="+c.access_token).setSubdomain(h).toString();e={start_uri:e,receive_uri:e,post_uri:e,chunk_start_uri:e,chunk_receive_uri:e,chunk_post_uri:e,min_size:d.minSize,min_width:d.minWidth,min_height:d.minHeight,min_length:d.minLength,max_size:d.maxSize,max_length:d.maxLength,extensions:d.extensions,logging_delay:d.loggingDelay,max_transport_retries:d.maxTransportRetries,transport_retry_interval_base:d.transportRetryIntervalBase,max_server_retries:d.maxServerRetries,server_retry_interval_base:d.serverRetryIntervalBase,source:c.source,target_id:c.target_id,target_type:c.target_type};d=a.call(this,e)||this;d.$ProductVideoChunkedUploader1="";return d}var d=c.prototype;d.getUploadTime=function(){var a=this.__getSession();return a!=null?a.getUploadTime():null};d.getEncodingTime=function(){var a=this.__getSession();return a!=null?a.getEncodingTime():null};d.abort=function(){this.cancel()};d.upload=function(c){var d=c.getFile();d=b("AdsVideoUploadUtil").getVideoTitle(d);this.$ProductVideoChunkedUploader1=d?d:"";a.prototype.upload.call(this,c)};d.__getVideoUploadSession=function(a){return new(b("AdsVideoUploadSession"))(a)};d.getVideoTitle=function(){return this.$ProductVideoChunkedUploader1};d.__createSession=function(a){return new(b("AdsVideoUploadSession"))(a)};d.__getEventsWhichShouldListenFromSession=function(){var c=a.prototype.__getEventsWhichShouldListenFromSession.call(this);c.push(b("AdsVideoUploadEvents").ENCODING_SUCCESS,b("AdsVideoUploadEvents").ENCODING_ERROR);return c};d.__getEventsForWhichSessionShouldBeSetToNull=function(){return["upload-failed",b("AdsVideoUploadEvents").ENCODING_SUCCESS,b("AdsVideoUploadEvents").ENCODING_ERROR]};d.__delegateEvent=function(c,d){var e=null;if(c==="upload-progressed"){var f=b("VideoUploadProgressBar").computeProgress(d.start_offset,d.sent_bytes,d.file_size,0,0);e=f/100}else c==="upload-finished"?this.post({}):c==="post-finished"?e=d.video_id:c==="post-failed"&&(c="upload-failed");a.prototype.__delegateEvent.call(this,c,e)};return c}(b("VideoUploader"));e.exports=a}),null); __d("PageContentTabProductUploadVideoButton.react",["cx","fbt","AdsVideoUploadConfig","AdsVideoUploadEvents","AsyncRequest","FileInput.react","GraphAPI","Link.react","ProductVideoChunkedUploader","React","VideoUploadFile","XUIGrayText.react","promiseDone"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=1e3;a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g